Skip to content

Expose AWS connector setup, create, and verify - #1780

Merged
lukkor merged 1 commit into
mainfrom
ludovic/expose-aws-connector
Sep 1, 2026
Merged

Expose AWS connector setup, create, and verify#1780
lukkor merged 1 commit into
mainfrom
ludovic/expose-aws-connector

Conversation

@lukkor

@lukkor lukkor commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

The access-review driver can assume an audit role, but operators had no supported path to create that connector. Add GraphQL, MCP, CLI, and n8n operations plus a console dialog so a single AWS account can be connected with server-built setup artifacts and named verification checks.


Summary by cubic

Operators previously had no supported way to create the AWS audit-role connector, even though access reviews could assume the role. This adds setup, creation, and verification flows across the API, CLI, n8n, MCP, and console, with server-generated federation artifacts and named checks. AWS quick-create remains optional and requires a configured public CloudFormation template URL.

Tests +925 -11

Covers AWS setup artifacts, connector creation and verification, API behavior, and provider capability discovery across end-to-end and unit tests.

GraphQL API +367 -52

Adds AWS setup queries, workload-identity connector creation and verification, provider settings, and federation availability checks.

MCP +419 -16

Adds setup, create, and verify tools with connector types and OpenAPI schema definitions.

prb (CLI) +392 -0

Adds prb connector setup-aws, prb connector create, and prb connector verify commands.

Service +644 -67

Generates AWS setup artifacts, validates account and role configuration, and returns named checks for role assumption and trust-policy configuration.

App: console +651 -54

Adds a localized workload-identity dialog that collects AWS settings, displays federation values and setup artifacts, and reports verification results.

Package: n8n-node +328 -0

Adds a Connector resource with setupAws, create, and verify operations.

Other +40 -0

Embeds the AWS audit-role CloudFormation template and adds Helm configuration for its public URL.

Written for commit 48afb16. Summary will update on new commits.

Review in cubic

@lukkor
lukkor requested a review from a team August 26, 2026 14:14
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from f675a01 to 221c4f2 Compare August 26, 2026 16:54
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from 221c4f2 to 48afb16 Compare August 26, 2026 17:50
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from 48afb16 to ae85b3e Compare August 27, 2026 07:57

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 59 files

Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread pkg/cloud/verify.go Outdated
Comment thread pkg/cloud/aws/setup.go Outdated
Comment thread pkg/server/api/console/v1/connector_resolvers.go Outdated
Comment thread packages/n8n-node/nodes/Probo/actions/accessReviewSource/create.operation.ts Outdated
Comment thread pkg/cloud/verify_test.go Outdated
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from ae85b3e to 303da65 Compare August 27, 2026 10:04

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 60 files

Re-trigger cubic

@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from 303da65 to 5f33678 Compare August 27, 2026 12:23

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 60 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 6 unresolved issues already reported by Cubic.

Fix all with cubic | Re-trigger cubic

Comment thread e2e/mcp/aws_connector_test.go Outdated
Comment thread pkg/connector/provider/aws.go Outdated
Comment thread pkg/server/api/console/v1/connector_resolvers.go Outdated
Comment thread pkg/cloud/aws/trustpolicy.go Outdated
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from 5f33678 to 2f8648e Compare August 27, 2026 15:30

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 58 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 3 unresolved issues already reported by Cubic.
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread pkg/cmd/connector/verify/verify.go Outdated
Comment thread pkg/cmd/connector/create/create.go Outdated
Comment thread pkg/server/api/mcp/v1/schema.resolvers.go Outdated
Comment thread packages/n8n-node/nodes/Probo/actions/accessReviewSource/create.operation.ts Outdated
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from 2f8648e to 802b031 Compare August 27, 2026 17:03
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from 802b031 to 3f523ec Compare August 27, 2026 17:05

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 58 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 6 unresolved issues already reported by Cubic.
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread pkg/cloud/verify.go Outdated
Comment thread pkg/server/api/mcp/v1/specification.yaml
Comment thread pkg/server/api/console/v1/connector_workload_identity.go
Comment thread e2e/console/aws_connector_test.go Outdated
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch 2 times, most recently from 3d5fadc to 6bd3124 Compare August 28, 2026 08:26

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 49 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 6 unresolved issues already reported by Cubic.
Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread pkg/cloud/aws/setup.go Outdated
Comment thread pkg/cloud/aws/setup.go Outdated
Comment thread pkg/server/api/console/v1/graphql/connector.graphql
Comment thread pkg/server/api/console/v1/base_resolvers.go Outdated
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from 6bd3124 to 4e6bf9d Compare August 28, 2026 09:35

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 49 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 7 unresolved issues already reported by Cubic.
Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread pkg/cloud/verify_test.go Outdated
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from 4e6bf9d to b0cb603 Compare August 31, 2026 11:03
Base automatically changed from ludovic/add-aws-access-review to main August 31, 2026 11:25
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from b0cb603 to 90fdf18 Compare August 31, 2026 12:31

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 57 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 7 unresolved issues already reported by Cubic.
Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread pkg/cloud/aws/setup.go Outdated
Comment thread pkg/server/api/mcp/v1/types/connector.go Outdated
Comment thread contrib/cloudformation/aws-audit-role/README.md Outdated
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from 90fdf18 to 89baca3 Compare August 31, 2026 12:52

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 57 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 4 unresolved issues already reported by Cubic.
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread pkg/cloud/aws/setup.go Outdated
Comment thread pkg/server/api/mcp/v1/schema.resolvers.go Outdated
Comment thread e2e/mcp/aws_connector_test.go
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from 89baca3 to 1f4567d Compare August 31, 2026 13:52

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 57 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 7 unresolved issues already reported by Cubic.
Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread pkg/cloud/aws/setup.go
Comment thread pkg/server/api/mcp/v1/specification.yaml Outdated
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from 1f4567d to 0174c01 Compare August 31, 2026 15:10

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 50 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 2 unresolved issues already reported by Cubic.
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread pkg/cmd/access-review/source/create/create.go Outdated
Comment thread pkg/cloud/aws/setup.go Outdated
Comment thread pkg/cloud/aws/setup.go Outdated
Comment thread pkg/cloud/aws/setup_test.go
Comment thread pkg/server/api/mcp/v1/schema.resolvers.go Outdated
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from 0174c01 to df3ec50 Compare August 31, 2026 15:53

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 52 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 7 unresolved issues already reported by Cubic.
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread pkg/cloud/aws/setup.go Outdated
Comment thread pkg/cmd/access-review/source/create/create.go Outdated
Comment thread contrib/helm/charts/probo/templates/deployment.yaml
Comment thread pkg/server/api/console/v1/connector_resolvers.go Outdated
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from df3ec50 to 0b67a53 Compare August 31, 2026 17:13

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 55 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread pkg/cmd/access-review/source/create/create.go
Comment thread pkg/server/api/console/v1/connector_resolvers.go Outdated
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from 0b67a53 to cac2859 Compare September 1, 2026 08:22

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 57 files (changes from recent commits).

Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread pkg/cloud/aws/setup.go
Comment thread e2e/mcp/aws_connector_test.go Outdated
Comment thread pkg/connector/provider/registry.go
Comment thread contrib/helm/charts/probo/values.yaml
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch 3 times, most recently from 7e96ea4 to f900d70 Compare September 1, 2026 09:18

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 57 files (changes from recent commits).

Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread pkg/server/api/console/v1/graphql/connector.graphql
Comment thread pkg/cmd/access-review/source/probe/probe.go
Comment thread pkg/cloud/aws/setup.go
Comment thread e2e/console/aws_connector_test.go Outdated
Comment thread contrib/cloudformation/aws-audit-role/README.md Outdated
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch 4 times, most recently from a7b46ea to 5c2ffbf Compare September 1, 2026 11:32
The access-review driver can assume an audit role, but operators
had no supported path to create that connector. Add GraphQL, MCP,
CLI, and n8n operations plus a console dialog so a single AWS
account can be connected with server-built setup artifacts and
named verification checks.

The connector now copies a registry module snippet and records a
role ARN. Document getprobo/audit-role/aws, the issuer URL without
an /org/ segment, and the probe-by-assume path so Terraform and
CloudFormation stay in parity and operators do not invent values.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
@lukkor
lukkor force-pushed the ludovic/expose-aws-connector branch from 5c2ffbf to 66c1aa3 Compare September 1, 2026 11:34

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 issues found across 66 files (changes from recent commits).

Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/n8n-node/nodes/Probo/actions/accessReviewSource/probe.operation.ts">

<violation number="1" location="packages/n8n-node/nodes/Probo/actions/accessReviewSource/probe.operation.ts:25">
P1: This module is never registered by the access-review-source resource, so n8n omits the `probe` operation and cannot execute this new code. Register its operation option, description, and export in the resource index.</violation>
</file>

<file name="packages/n8n-node/nodes/Probo/actions/accessReviewSource/create.operation.ts">

<violation number="1" location="packages/n8n-node/nodes/Probo/actions/accessReviewSource/create.operation.ts:98">
P2: When connector creation commits but its response is lost or contains a resolver error, this await exits before cleanup starts and leaves an unreferenced connector. Make the creation flow idempotent or reconcile the connector after unsuccessful responses so retries cannot accumulate orphaned connectors.</violation>
</file>

<file name="pkg/server/api/console/v1/connector_connection_status.go">

<violation number="1" location="pkg/server/api/console/v1/connector_connection_status.go:88">
P2: When `SourceNeedsReconnect` fails, this log omits `connectorID`, so identical lookup or decryption failures cannot be attributed to a connector. Include the connector ID in this error log.</violation>
</file>

<file name="pkg/cmd/access-review/source/probe/probe.go">

<violation number="1" location="pkg/cmd/access-review/source/probe/probe.go:70">
P1: The new command is never registered with the `source` command, so `prb access-review source probe` is unavailable. Register `probe.NewCmdProbe(f)` in the parent command.</violation>
</file>

<file name="pkg/cloud/aws/setup.go">

<violation number="1" location="pkg/cloud/aws/setup.go:139">
P2: When a customer uses a valid IAM role path containing characters outside `[\w+=,.@-]`, `NewConnectorSettings` rejects the ARN even though AWS accepts it. Validate the ARN with AWS’s ARN parser and separately enforce only the supported partition and IAM-role constraints, or broaden the shared path grammar.</violation>
</file>

<file name="pkg/connector/provider/registry_test.go">

<violation number="1" location="pkg/connector/provider/registry_test.go:145">
P3: The new `WorkloadIdentityExtraSettings` check in TestEveryProviderSettingsReachADialog is a tautology: WorkloadIdentityExtraSettings() already returns nil when SupportsWorkloadIdentity() is false (both derive from `WorkloadIdentity != nil`), so the assertion can never fail and pins nothing. Unlike the API-key sibling (whose SupportsAPIKey is false for a managed key), there is no case where a WLI settings list reaches an unoffered path. Either drop the block or assert a condition that the list length cannot already imply.</violation>
</file>

<file name="pkg/awsx/arn/arn.go">

<violation number="1" location="pkg/awsx/arn/arn.go:50">
P2: Existing IAM roles with valid path characters outside `\w+=,.@-` cannot be connected because `ParseRole` rejects their ARNs. Use IAM’s printable-ASCII path grammar while retaining the restricted 64-character class for the final role name, and keep the console validator in sync.</violation>
</file>

Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

import { NodeOperationError } from 'n8n-workflow';
import { proboApiRequest } from '../../GenericFunctions';

export const description: INodeProperties[] = [

@cubic-dev-ai cubic-dev-ai Bot Sep 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: This module is never registered by the access-review-source resource, so n8n omits the probe operation and cannot execute this new code. Register its operation option, description, and export in the resource index.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/n8n-node/nodes/Probo/actions/accessReviewSource/probe.operation.ts, line 25:

<comment>This module is never registered by the access-review-source resource, so n8n omits the `probe` operation and cannot execute this new code. Register its operation option, description, and export in the resource index.</comment>

<file context>
@@ -0,0 +1,96 @@
+import { NodeOperationError } from 'n8n-workflow';
+import { proboApiRequest } from '../../GenericFunctions';
+
+export const description: INodeProperties[] = [
+	{
+		displayName: 'Access Review Source ID',
</file context>
Fix with cubic

}
)

func NewCmdProbe(f *cmdutil.Factory) *cobra.Command {

@cubic-dev-ai cubic-dev-ai Bot Sep 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: The new command is never registered with the source command, so prb access-review source probe is unavailable. Register probe.NewCmdProbe(f) in the parent command.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pkg/cmd/access-review/source/probe/probe.go, line 70:

<comment>The new command is never registered with the `source` command, so `prb access-review source probe` is unavailable. Register `probe.NewCmdProbe(f)` in the parent command.</comment>

<file context>
@@ -0,0 +1,136 @@
+	}
+)
+
+func NewCmdProbe(f *cmdutil.Factory) *cobra.Command {
+	cmd := &cobra.Command{
+		Use:   "probe <id>",
</file context>
Fix with cubic

awsRoleArn,
};

const connectorResponse = await proboApiRequest.call(this, createConnectorQuery, {

@cubic-dev-ai cubic-dev-ai Bot Sep 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: When connector creation commits but its response is lost or contains a resolver error, this await exits before cleanup starts and leaves an unreferenced connector. Make the creation flow idempotent or reconcile the connector after unsuccessful responses so retries cannot accumulate orphaned connectors.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/n8n-node/nodes/Probo/actions/accessReviewSource/create.operation.ts, line 98:

<comment>When connector creation commits but its response is lost or contains a resolver error, this await exits before cleanup starts and leaves an unreferenced connector. Make the creation flow idempotent or reconcile the connector after unsuccessful responses so retries cannot accumulate orphaned connectors.</comment>

<file context>
@@ -0,0 +1,178 @@
+		awsRoleArn,
+	};
+
+	const connectorResponse = await proboApiRequest.call(this, createConnectorQuery, {
+		input: connectorInput,
+	});
</file context>
Fix with cubic

return "", err
}

r.logger.ErrorCtx(ctx, "cannot determine connector reconnect requirement", log.Error(err))

@cubic-dev-ai cubic-dev-ai Bot Sep 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: When SourceNeedsReconnect fails, this log omits connectorID, so identical lookup or decryption failures cannot be attributed to a connector. Include the connector ID in this error log.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pkg/server/api/console/v1/connector_connection_status.go, line 88:

<comment>When `SourceNeedsReconnect` fails, this log omits `connectorID`, so identical lookup or decryption failures cannot be attributed to a connector. Include the connector ID in this error log.</comment>

<file context>
@@ -0,0 +1,98 @@
+			return "", err
+		}
+
+		r.logger.ErrorCtx(ctx, "cannot determine connector reconnect requirement", log.Error(err))
+
+		return "", gqlutils.Internal(ctx)
</file context>
Suggested change
r.logger.ErrorCtx(ctx, "cannot determine connector reconnect requirement", log.Error(err))
r.logger.ErrorCtx(
ctx,
"cannot determine connector reconnect requirement",
log.String("connector_id", connectorID.String()),
log.Error(err),
)
Fix with cubic

Comment thread pkg/cloud/aws/setup.go
func NewConnectorSettings(roleARN string) (coredata.AWSConnectorSettings, error) {
roleARN = strings.TrimSpace(roleARN)

if _, err := arn.ParseRole(roleARN); err != nil {

@cubic-dev-ai cubic-dev-ai Bot Sep 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: When a customer uses a valid IAM role path containing characters outside [\w+=,.@-], NewConnectorSettings rejects the ARN even though AWS accepts it. Validate the ARN with AWS’s ARN parser and separately enforce only the supported partition and IAM-role constraints, or broaden the shared path grammar.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pkg/cloud/aws/setup.go, line 139:

<comment>When a customer uses a valid IAM role path containing characters outside `[\w+=,.@-]`, `NewConnectorSettings` rejects the ARN even though AWS accepts it. Validate the ARN with AWS’s ARN parser and separately enforce only the supported partition and IAM-role constraints, or broaden the shared path grammar.</comment>

<file context>
@@ -0,0 +1,204 @@
+func NewConnectorSettings(roleARN string) (coredata.AWSConnectorSettings, error) {
+	roleARN = strings.TrimSpace(roleARN)
+
+	if _, err := arn.ParseRole(roleARN); err != nil {
+		if errors.Is(err, arn.ErrUnsupportedPartition) {
+			return coredata.AWSConnectorSettings{}, fmt.Errorf("cannot create aws connector: awsRoleArn is not a supported AWS partition")
</file context>
Fix with cubic

Comment thread pkg/awsx/arn/arn.go
// RoleARNPattern is the IAM role ARN grammar. Partition is group 1,
// account is group 2, role name is group 3. The console field uses
// the same expression with the three supported partitions inlined.
RoleARNPattern = `arn:([^:]+):iam::([0-9]{12}):role(?:/[\w+=,.@-]+)*/([\w+=,.@-]{1,64})`

@cubic-dev-ai cubic-dev-ai Bot Sep 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Existing IAM roles with valid path characters outside \w+=,.@- cannot be connected because ParseRole rejects their ARNs. Use IAM’s printable-ASCII path grammar while retaining the restricted 64-character class for the final role name, and keep the console validator in sync.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pkg/awsx/arn/arn.go, line 50:

<comment>Existing IAM roles with valid path characters outside `\w+=,.@-` cannot be connected because `ParseRole` rejects their ARNs. Use IAM’s printable-ASCII path grammar while retaining the restricted 64-character class for the final role name, and keep the console validator in sync.</comment>

<file context>
@@ -32,7 +36,40 @@ const (
+	// RoleARNPattern is the IAM role ARN grammar. Partition is group 1,
+	// account is group 2, role name is group 3. The console field uses
+	// the same expression with the three supported partitions inlined.
+	RoleARNPattern = `arn:([^:]+):iam::([0-9]{12}):role(?:/[\w+=,.@-]+)*/([\w+=,.@-]{1,64})`
+)
+
</file context>
Suggested change
RoleARNPattern = `arn:([^:]+):iam::([0-9]{12}):role(?:/[\w+=,.@-]+)*/([\w+=,.@-]{1,64})`
RoleARNPattern = `arn:([^:]+):iam::([0-9]{12}):role(?:/[\x21-\x7E]+)*/([\w+=,.@-]{1,64})`
Fix with cubic

)
}

if len(reg.WorkloadIdentityExtraSettings()) > 0 {

@cubic-dev-ai cubic-dev-ai Bot Sep 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The new WorkloadIdentityExtraSettings check in TestEveryProviderSettingsReachADialog is a tautology: WorkloadIdentityExtraSettings() already returns nil when SupportsWorkloadIdentity() is false (both derive from WorkloadIdentity != nil), so the assertion can never fail and pins nothing. Unlike the API-key sibling (whose SupportsAPIKey is false for a managed key), there is no case where a WLI settings list reaches an unoffered path. Either drop the block or assert a condition that the list length cannot already imply.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pkg/connector/provider/registry_test.go, line 145:

<comment>The new `WorkloadIdentityExtraSettings` check in TestEveryProviderSettingsReachADialog is a tautology: WorkloadIdentityExtraSettings() already returns nil when SupportsWorkloadIdentity() is false (both derive from `WorkloadIdentity != nil`), so the assertion can never fail and pins nothing. Unlike the API-key sibling (whose SupportsAPIKey is false for a managed key), there is no case where a WLI settings list reaches an unoffered path. Either drop the block or assert a condition that the list length cannot already imply.</comment>

<file context>
@@ -141,6 +141,15 @@ func TestEveryProviderSettingsReachADialog(t *testing.T) {
 				)
 			}
+
+			if len(reg.WorkloadIdentityExtraSettings()) > 0 {
+				assert.Truef(
+					t,
</file context>
Fix with cubic

@lukkor
lukkor merged commit 66c1aa3 into main Sep 1, 2026
20 checks passed
@lukkor
lukkor deleted the ludovic/expose-aws-connector branch September 1, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant